<template>
	<view class="searchs-centers">
		<view class="searchs">
			<view class="name">{{name}}</view>
			<input placeholder="请输入搜索关键字" v-model="text" class="inputs"/>
		</view>
		<view class="btn-arrow" @click.stop="btns"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello',
				text:'',
				name:'',
				url:''
			 }
			},
			onLoad(option) {
				let self=this
				if(option.name){
					self.name=option.name
					self.url=option.url
				}
			},
			methods:{
				btns(){
					let self=this
					if(!self.text){
						uni.showToast({
							title: '请输入关键字',
							icon: 'none',
							duration: 2000
						});
						return
					}
					uni.navigateTo({
						url: '/pages/index/detail?url='+self.url+"&text="+self.text
					});
					/**
					uni.showToast({
					    title: '标题',
						icon:'none',
					    duration: 2000
					});**/
				}
			}
		}
</script>

<style lang="scss">
	page{
		background-color: #FFFFFF;
	}
	.searchs-centers{
		width: 100%;
		overflow: hidden;
		margin: 0prx auto;
		.searchs{
			width: 90%;
			overflow: hidden;
			margin: 20rpx auto;
		}
		.btn-arrow{
			width: 128rpx;
			height: 128rpx;
			background: url(../../static/arrows.png) no-repeat center;
			background-size: 100%;
			margin: 20rpx auto;
			
		}
		.name{
			width: 98%;
			overflow: hidden;
			line-height: 48rpx;
			margin: 10rpx auto;
		}
		.inputs{
			width: 97%;
			margin: 10rpx auto;
			line-height: 88rpx;
			padding-left: 1%;
			border: 2rpx solid #333;
			border-radius: 20rpx;
			height: 88rpx;
			overflow: hidden;
		}
	}
</style>
